export async function heroVerification(ctx, next) {
  try {
    ctx.verifyParams({
      name: { type: "string", required: true },
      story: { type: "string", required: true },
      classification: { type: "string", required: true },
      // story: { type: "string", required: true },
      skillList: { type: "array", required: true },
    });
  } catch (error) {
    return ctx.app.emit(
      "error",
      {
        code: 10001,
        message: "请输入完整英雄信息",
        result: error,
      },
      ctx
    );
  }
  await next();
}
export async function heroSkillListVerification(ctx, next) {
  try {
    ctx.verifyParams({
      skillList: { type: "array", required: true },
    });
  } catch (error) {
    return ctx.app.emit(
      "error",
      {
        code: 10001,
        message: "请输入完整的皮肤信息",
        result: error,
      },
      ctx
    );
  }
  await next();
}
